<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>WargclubArgentina> Login</title>
	<link href="css/style.css" type="text/css" rel="stylesheet" />
	<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
	<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>
<center><img src="imagenes/Warg Club Argentina.jpg" width="1000" height="144" alt="WargClubArgentina" longdesc="http://wargclubargentina.com.ar" />
</center>
<body>
	<!-- start header div -->	
<!-- end header div -->	
    <center>
    <div id="menu">
      <ul id="MenuBar2" class="MenuBarHorizontal">
        <li><a href="#">Como Funciona</a>        </li>
        <li><a href="#">Grupo</a></li>
        <li><a href="#">Proyectos</a>        </li>
        <li><a href="#">Contacto</a></li>
      </ul>
    </div>
    </center>
    <div id="video"> 
      <p>&nbsp;      </p>
      <p>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="640" height="480" id="FLVPlayer">
          <param name="movie" value="FLVPlayer_Progressive.swf" />
          <param name="quality" value="high" />
          <param name="wmode" value="opaque" />
          <param name="scale" value="noscale" />
          <param name="salign" value="lt" />
          <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_1&amp;streamName=videos/WargClubArgentina&amp;autoPlay=false&amp;autoRewind=false" />
          <param name="swfversion" value="8,0,0,0" />
          <!-- Esta etiqueta param indica a los usuarios de Flash Player 6.0 r65 o posterior que descarguen la versión más reciente de Flash Player. Elimínela si no desea que los usuarios vean el mensaje. -->
          <param name="expressinstall" value="Scripts/expressInstall.swf" />
          <!-- La siguiente etiqueta object es para navegadores distintos de IE. Ocúltela a IE mediante IECC. -->
          <!--[if !IE]>-->
          <object type="application/x-shockwave-flash" data="FLVPlayer_Progressive.swf" width="640" height="480">
            <!--<![endif]-->
            <param name="quality" value="high" />
            <param name="wmode" value="opaque" />
            <param name="scale" value="noscale" />
            <param name="salign" value="lt" />
            <param name="FlashVars" value="&amp;MM_ComponentVersion=1&amp;skinName=Clear_Skin_1&amp;streamName=videos/WargClubArgentina&amp;autoPlay=false&amp;autoRewind=false" />
            <param name="swfversion" value="8,0,0,0" />
            <param name="expressinstall" value="Scripts/expressInstall.swf" />
            <!-- El navegador muestra el siguiente contenido alternativo para usuarios con Flash Player 6.0 o versiones anteriores. -->
            <div>
              <h4>El contenido de esta página requiere una versión más reciente de Adobe Flash Player.</h4>
              <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Obtener Adobe Flash Player" /></a></p>
            </div>
            <!--[if !IE]>-->
          </object>
          <!--<![endif]-->
        </object>
      </p>
    </div>
    
	
	<!-- start wrap div -->	
	<div id="wrap">
	    <!-- start PHP code -->
	    <?php
	    
	    	mysql_connect("localhost", "wargclub_root", "33205524rox") or die(mysql_error()); // Connect to database server(localhost) with username and password.
			mysql_select_db("wargclub_gestion") or die(mysql_error()); // Select registration database.
			
			if(isset($_POST['name']) && !empty($_POST['name']) AND isset($_POST['password']) && !empty($_POST['password'])){
				$username = mysql_escape_string($_POST['name']);
				$password = mysql_escape_string(md5($_POST['password']));
				
				$search = mysql_query("SELECT username, password, active FROM users WHERE username='".$username."' AND password='".$password."' AND active='1'") or die(mysql_error()); 
				$match  = mysql_num_rows($search);
				
				if($match > 0){
					$msg = 'Login Exitoso! Puede cambiar su password ahora';
					}
					else{
					$msg = 'Login Failed!<br /> Por favor asegurese que ha ingresado los datos correctos o que la cuenta ha sido activada.';
				}
			}
				
	    	
	    ?>
	    <!-- stop PHP Code -->
	
		<!-- title and description -->	
<h2>Ingrese aqui</h2>
<p>Por favor ingrese su nombre y password para ingresar:</p>
		
		<?php 
			if(isset($msg)){ // Check if $msg is not empty
				echo '<div class="statusmsg">'.$msg.'</div>'; // Display our message and add a div around it with the class statusmsg
			       
			} ?>
		
		<!-- start sign up form -->	
		<form action="" class="form"method="post">
			<label for="name">Nombre:</label>
			<input type="text" name="name" value="" />
			<label for="password">Password:</label>
			<input type="password" name="password" value="" />
			
			<input type="submit" class="submit_button" value="Login" /><br/>
		        <a href="changepassword.php">Cambiar password</a>
		
		
		<!-- end sign up form -->	
		
	</div>
	<!-- end wrap div -->	
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
swfobject.registerObject("FLVPlayer");
</script>
</body>
</html>